package express.middle;

import express.IExpressCalculate;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 中缀表达式测试
 *
 * @author miweidong
 * @date 2021-08-10 15:42
 */
public class TestMiddleExpress {
    public static void main(String[] args) {
        IExpressCalculate calculate = new MiddleExpressCalculate();
        List<String> words = new ArrayList<>();
        words.add("(");
        words.add("3");
        words.add("+");
        words.add("4");
        words.add("*");
        words.add("5");
        words.add(")");
        words.add("*");
        words.add("5");
        words.add("-");
        words.add("6");
        BigDecimal result = calculate.calculate(words);
        System.out.println(result);

    }
}
